<seed-content #content>
  <seed-toolbar-header>
    <seed-toolbar-title>我的优惠券</seed-toolbar-title>
    <seed-toolbar-menu></seed-toolbar-menu>
    <em class="coupon-explain" (click)="goToCouponExplain()"></em>
  </seed-toolbar-header>

  <seed-infinite-scroll
    (infiniteScroll)="getMyCouponList()">
<!--兑换码功能 延期到 2.5.0 版本-->
    <div class="coupon-search seed-flexbox seed-flexbox-align-center">
      <em class="coupon-input-icon"></em>
      <input type="text" placeholder="请输入兑换码" class="seed-flexbox-item"
             name="couponExchange" [(ngModel)]="exchangeCode">
      <span class="coupon-exchange" (click)="postCouponExchange(exchangeCode)">兑换</span>
    </div>

    <div *ngIf="couponList?.length > 0 ">
      <div class="coupons-list" *ngFor="let coupon of couponList ; let i = index ;">

        <seed-coupon-card [coupon]="coupon" (goToDetail)="goToCouponDetail(coupon.codeId)" [markType]="1"></seed-coupon-card>

      </div>
      <seed-infinite-scroll-content class="load-bg" *ngIf="couponList.length > 5"></seed-infinite-scroll-content>
    </div>

  </seed-infinite-scroll>
  <missing-default-content *ngIf="couponList.length==0"></missing-default-content>

  <!--兑换码功能 延期到 2.5.0 版本-->
  <seed-modal #modal1 [content]="content">

    <div  #sdf class="seed-modal-content couponWrap">
      <div class="modal-close-btn" (click)="closeModal()">
        <button></button>
      </div>
      <div class="coupon-exchange-title">该券已放入您的优惠券</div>
      <seed-coupon-card [coupon]="coupon" [markType]="3" class="seed-modal-content"  *ngIf="coupon"></seed-coupon-card>
    </div>
  </seed-modal>

</seed-content>

